<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery.js"></script>
    <script src="../js/common.js"></script>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/callus.css">
    <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=IVrHK93qQBAEqGWKBvGjHpn2RwxqEwz9"></script>
</head>
<body>
<div id="top"></div>
<div class="middle">
    <div>
        <div>
            <div class="title">联系我们</div>
        </div>
        <div>
            <div id="map"></div>
            <div>
                <div> 品质至上，诚信为重，用心服务，以质量领先，我们真诚与您合作，竭诚为您服务!</div>
                <div>Qualty first, integrity oriented, hard service, leading technology, we sincerely cooperate with
                    you, for your dedicated service!
                </div>
            </div>
        </div>
    </div>
</div>
<div id="foot"></div>
</body>
</html>
<script>
    var map = new BMapGL.Map('map'); // 创建Map实例
    let point = new BMapGL.Point(104.066293, 30.579349);//设置中心点坐标
    map.centerAndZoom(point, 18); // 初始化地图,设置中心点坐标和地图级别
    map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
    var scaleCtrl = new BMapGL.ScaleControl();  // 添加比例尺控件
    map.addControl(scaleCtrl);
    var zoomCtrl = new BMapGL.ZoomControl();  // 添加比例尺控件
    map.addControl(zoomCtrl);

    // 创建小车图标
    var myIcon = new BMapGL.Icon("../img/10_hf6d.jpg", new BMapGL.Size(52, 26));
    // 创建Marker标注，使用小车图标
    // var pt = new BMapGL.Point(116.417, 39.909);
    var marker = new BMapGL.Marker(point, {
        icon: myIcon
    });
    // 将标注添加到地图
    map.addOverlay(marker);

    // 创建信息窗口
    var opts = {
        width: 200,
        height: 100,
        title: '万息集训'
    };

    var html = "<div>\n" +
        "            <div class=\"title\">联系我们</div>\n" +
        "        </div>";
    console.log(html)
    var infoWindow = new BMapGL.InfoWindow(html, opts);
    // 点标记添加点击事件
    marker.addEventListener('click', function () {
        map.openInfoWindow(infoWindow, point); // 开启信息窗口
    });
</script>